Repository navigation
Hohmann transfer: the one-burn flyby / intercept node meets the target again (#2788) - #2790
Merged
Merged
Conversation
…again With Capture off, the rendezvous argument was false, so the arrival point was free along the target's orbit and, with only the first burn in the cost, the node could reach the target's orbit without meeting the target (#2788). Match orbit and Arrival delay only apply to the two-burn transfer, so they are ignored in the one-burn mode, even when left set from it.
Contributor
✅ Build Artifact 🚀MechJeb2-486505d.zip (built from 4060cca) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2788.
The Hohmann transfer's one-burn mode ("Flyby / Impact" for a body, "Intercept" for a vessel) could make a node that reaches the target's orbit without meeting the target. Whether it met the target depended on when it was planned.
Cause
OperationGeneric.MakeNodesImplpassedCapture && !MatchOrbitasrendezvous, which is false wheneverCaptureis off.TwoImpulseTransferthen leaves the arrival point along the target's orbit free. Withcapture: falsethe cost is the first burn alone, which doesn't depend on that point, so the result came down to which of the two starting guesses (offset 0 or half the target's period) won. This came in with 298b15a ("Hohmann transfer UX overhaul"); 2.15.3.0 has it, 2.15.4.0 doesn't.Fix
"Match orbit" and "Arrival delay" only apply to the two-burn transfer, so in the one-burn mode they are ignored:
matchOrbit = Capture && MatchOrbit,rendezvous = !matchOrbit, and the arrival delay is used only whenCapture && !matchOrbit. The issue's suggested!MatchOrbitalone isn't enough: the window only hides "Match orbit" in the one-burn mode, so a box left ticked from the transfer mode (or set through kOS) would still free the arrival point. The flyby aims at the target's centre, as in 2.15.4.0.Test
In KSP: Kerbal X in a 147 km equatorial orbit (3.2x system), Mun as target, the operation planned "at the optimum time" from 12 start times spread over one synodic period, and each burn placed as a node and checked for a Mun encounter.
No MechJeb exceptions in either run.